package user;

import book.Book;
import book.BookList;
import operation.IOpteration;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2024-10-22
 * Time:14:30
 */
public abstract class  User {
    protected String name;
    public IOpteration[] iOpterations;//只是定义没有初始化大小

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();
    public void doOPeraytion(int choice, BookList bookList){
        iOpterations[choice].work(bookList);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", iOpterations=" + Arrays.toString(iOpterations) +
                '}';
    }
}
